const express = require("express");
const bodyParser = require("body-parser");
const loginReg = require("./hairs/login");
const hairProject = require("./hairs/hair");
const Employee_info = require("./hairs/in");
const db = require("./db/index");
const app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.static('public'));
app.use("/", async(req, res, next) => {
    await db;
    next();
});
app.use(loginReg);
app.use(hairProject);
app.use(MemberLevel);
app.use(Employee_info);
app.use(Customers_booking);
app.listen(3000, err => {
    if (!err) console.log("启动成功");
    else console.log(err);
})